package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TPurchaseMapper;
import com.ruoyi.system.domain.TPurchase;
import com.ruoyi.system.service.ITPurchaseService;
import com.ruoyi.common.core.text.Convert;

/**
 * Service业务层处理
 * @date 2021-03-24
 */
@Service
public class TPurchaseServiceImpl implements ITPurchaseService
{
    @Autowired
    private TPurchaseMapper tPurchaseMapper;

    /**
     * 查询
     */
    @Override
    public TPurchase selectTPurchaseById(Long purchaseId)
    {
        return tPurchaseMapper.selectTPurchaseById(purchaseId);
    }

    @Override
    public List<TPurchase> selectTPurchaseListAll() {
        return tPurchaseMapper.selectTPurchaseListAll();
    }

    /**
     * 查询
     */
    @Override
    public List<TPurchase> selectTPurchaseList(TPurchase tPurchase)
    {
        return tPurchaseMapper.selectTPurchaseList(tPurchase);
    }

    /**
     * 新增
     */
    @Override
    public int insertTPurchase(TPurchase tPurchase)
    {
        return tPurchaseMapper.insertTPurchase(tPurchase);
    }

    /**
     * 修改
     */
    @Override
    public int updateTPurchase(TPurchase tPurchase)
    {
        return tPurchaseMapper.updateTPurchase(tPurchase);
    }

    /**
     * 删除
     */
    @Override
    public int deleteTPurchaseByIds(String ids)
    {
        return tPurchaseMapper.deleteTPurchaseByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除
     */
    @Override
    public int deleteTPurchaseById(Long purchaseId)
    {
        return tPurchaseMapper.deleteTPurchaseById(purchaseId);
    }
}